import App from './App.vue'
import { createApp } from 'vue'
// 引入icon svg插件需要配置代码
import '@/assets/iconfont/iconfont.css'
import 'element-plus/dist/index.css';
import router from '@/routers'
// 引入element-plus主题
// import 'element-plus/theme-chalk/dark/css-vars.css'
//引入主题文件
// import '@/themeStyle/dark.css' //自定义样式
// import '@/themeStyle/dark-var.css'  //自定义css变量文件
import './style.css'
import i18n from "@/locales/i18n.js"
import piniaPluginPersist from 'pinia-plugin-persist'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import { createPinia } from 'pinia'
import BackToTop from './components/common/commonBackToTop.vue'
import { create, NButton, NCarousel } from 'naive-ui'

// import vue3SeamlessScroll from "vue3-seamless-scroll";

import "@/permission";
const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
const naive = create({
  components: [NButton, NCarousel], // 根据需要引入其他组件
})

const pinia = createPinia()
pinia.use(piniaPluginPersist)
app.use(router)
app.use(pinia)
app.use(i18n)
app.use(naive)
// app.use(vue3SeamlessScroll)
app.component('BackToTop', BackToTop)
app.mount('#app')


